<template>
    <uni-transition :show="isShow">
        <view :class="ns.b()">
            <view class="position">
                <i-lottie ref="welcome" :height="1600" :width="900" @ready="onLottieReady" @done="onDone" :animation-data="animationData" />
            </view>
        </view>
    </uni-transition>
</template>

<script setup lang="ts">
import animationData from "@/assets/lotties/Animation - 1749779656472.json";
import { useNamespace } from "@/hooks";

const ns = useNamespace("welcome");

const isShow = ref(false);

const welcome = ref();

const onLottieReady = () => {
    welcome.value.play();
};

const onDone = () => {
    isShow.value = false;
};

onMounted(() => {
    isShow.value = true;
});
</script>

<style scoped lang="scss" src="./index.scss"></style>
